#ifndef _THREADTEST_
#define _THREADTEST_

#include "Core/Thread/Thread.h"
#include <iostream>
#include "UnitTest.h"

class ThreadTest : public UnitTest
{
private:
	class A : public Core::Thread::Thread
	{

	public:

		uint32 a;

		A()
		{
			PROFILE("A::A()");
			a=10;
		}

		virtual void Run()
		{
			PROFILE("A::Run()");
			const unsigned int size = 100;
			for(uint32 i=0; i<size; ++i)
				for(uint32 j=0; j<size; ++j)
					for(uint32 k=0; k<size; ++k)
						a+=(i-j+k)*(i+j-k)*(i-j-k);

		}

	};

public:
	virtual const char * GetName() const;
	virtual Core::error Create();
	virtual Core::error Destroy();
	virtual Core::error Execute();
};

#endif /* _THREADTEST_ */
